<?php

namespace App\Models\Permission;

use App\Models\Auth\User;
use Illuminate\Database\Eloquent\Relations\Pivot;

class UserRole extends Pivot
{
    public function users() {
        return $this->belongsToMany(User::class)->withPivot('id')->withTimestamps();
    }

    public function roles() {
        return $this->belongsToMany(Role::class)->withPivot('id')->withTimestamps();
    }
}
